package com.seek.eduorder.client;

import com.seek.commonutils.ordervo.CourseInfoOrder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

/**
 * @author: wml
 * @since: 2022/3/2 23:05
 */
@Component
@FeignClient("service-edu")
public interface CourseClient {

    // 根据课程 id 查询课程信息
    @GetMapping("/eduservice/course/getCourseInfoOrder/{id}")
    CourseInfoOrder getCourseInfoOrder(@PathVariable("id") String id);

    // 根据课程 id 增加该课程的销售数量（+1）
    @PutMapping("/eduservice/course/updateCourseInfoOrder/{id}")
    boolean updateCourseInfoOrder(@PathVariable("id") String id);
}
